Q: I am having trouble compiling and linking my application. The samples also
give the same errors. Why?
A: Either the compiler switches for the zApp libraries and your program do not
match or the zApp libraries have been built incorrectly. Read the files z21faq.txt
and z21comp.txt in the \zapp directory. z21faq.txt explains the most common
compiling and linking problems. z21comp.txt explains the building of different
zApp libraries.
Q: How can I change the font of a particular control in a dialog?
A: Use zControl::setFont(). The code snippet to do this follows:
font = new zFont("Helv", zPrPoint(0,80), FW_NORMAL); edit = new zEditLine(this, ID_EDIT, &_edit); ... edit->setFont(font, TRUE);This functionality was added to zApp 2.1 and the changes made to the upgrade are documented in \zapp\z21chang.txt.
Q: I want to do some validation before closing a window. How can I do this?
A: Override the virtual member function zWindow::kill(). If you do not wish
to close the window, return 1. Otherwise, return 0.
Q: Can I do graphics in a dialog?
A: zPane is the class to use to perform graphic operations. So, performing
graphics within a dialog involves placing a zPane inside a dialog. The following
code fragment shows how to do this:
Form::zWindow* w, zResId res) : zFormDialog(w, res) { // constructor of dialog ... dPane = new DrawPane(this, new Sizer(0,0,100,100)); // creates a zPane, at the top left corner of // the dialog, with width and height=100 ... } int DrawPane::draw(zDrawEvt* ev) { ... // do the graphics here }
Q: Is it possible to create a MDI dialog which is designed from a Resource
Editor?
A: Yes. The zMDIDialogFrame has two constructors, as shown.
zMDIDialogFrame::zMDIDialogFrame(zFrameWin* w, zResId& r, DWORD sty, int noAutoCreate) zMDIDialogFrame::zMDIDialogFrame(zFrameWin* w, zSizer* siz, DWORD s, const char* t)To create a zMDIDialogFrame designed using a resource editor use the first constructor as:
new zMDIDialogFrame(w, zResId(ID_MDIDIALOG));
Q: Are there any sample programs available, other than the ones that came with
zApp?
A: We have tech support samples on our BBS, many in the Windows Conference.
Given below is a list of some of the files available.
The process used to be laborious, involved stacks of catalogs, notecards, and work orders. But that was before Avanti Systems came along. James Greenwood, who led the project to automate and computerize the inspection process for National Airmotive Corp., immediately perceived that if the parts could be digitally rendered on the screen (in this case with bitmaps) and an "electronic work packet" created that tracked all of the work needed to be done to rebuild each motor, that the time and cost to rebuild would fall and the likelihood of human error dramatically reduced.
To build this "electronic workbench," Greenwood turned to zApp. Suprisingly, he was not originally attracted to zApp for its portability features (though they plan to start making use of them soon). Instead Greenwood saw in zApp an efficient way to build a powerful graphics-oriented application with less effort. He was particularly impressed with the depth of zApp's 200 object classes.
The final application, called Automated Inspection and Routing System, has access to an on-line illustrated parts catalog, which organizes images of all of the parts for each engine. As the technicians pull the engine apart, each component is examined. The inspector then pulls up the picture of the product in the application, makes notes as to order, replace, or repair the part. The zApp-created application then batches the part orders together and schedules the rebuild process.
Greenwood explains zApp's part in the process. "We found zApp to be a very simple product to use, but astoundingly robust. Our client, National Airmotive, tells us that the application has more than paid for itself already. We feel as though some of the kudos should go to zApp."
© Copyright 1995, Rogue Wave Software, Inc.